﻿
namespace CDV.IRMS.WebAPI.TaskExecution.Interface
{
    /// <summary>
    /// 矩阵控制服务接口
    /// </summary>
    public interface IMatrixControlService
    {
        /// <summary>
        /// 矩阵切换
        /// </summary>
        /// <param name="srcPort">源端口</param>
        /// <param name="destPort">目的端口</param>
        /// <param name="matrixID">矩阵ID</param>
        /// <returns>true：切换成功</returns>
        (bool, string) Take(string srcPort, string destPort, long? matrixID = null);

        /// <summary>
        /// 端口锁定
        /// </summary>
        /// <param name="destPort">目的端口</param>
        /// <param name="matrixID">矩阵ID</param>
        /// <returns>true：锁定成功</returns>
        (bool, string) Lock(string destPort, long? matrixID = null);

        /// <summary>
        /// 端口解锁
        /// </summary>
        /// <param name="destPort">目的端口</param>
        /// <param name="matrixID">矩阵ID</param>
        /// <returns>true：解锁成功</returns>
        (bool, string) UnLock(string destPort, long? matrixID = null);
    }
}
